<?php
require_once __DIR__ . '/vendor/autoload.php';

use PhpAmqpLib\Message\AMQPMessage;
use PhpAmqpLib\Connection\AMQPStreamConnection;

$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest', '/');
$channel = $connection->channel();

$channel->queue_declare('work');

$msg =new AMQPMessage('Work Message!');

$channel->basic_publish($msg, '', 'work');

echo "Send Work Success!\n";

$channel->close();
$connection->close();
